angular.module('${menuCode}')
.controller("${widgetCode}Ctrl",function($scope,AppKit){
	$scope.closeModal = function() {
		AppKit.closeModal();
	};
	
	$scope.loadEvectionDetailData = function() {
		var url='/aeaiem/services/EvectionReiDataProvider/rest/evection-rei-Detail-tast/'+$scope.detailId ;
		var promise = AppKit.getJsonApi(url);  
		promise.success(function(rspJson){
			$scope.evectionDetailData = rspJson;
		})
	};
	
	$scope.loadEvectionDetailData();
	$scope.sum = function(){
		var list = $scope.evectionDetailData.expenseList;
		var j = 0;
		for(var i=0;i<list.length;i++){
			j=j+list[i].transportationFee+list[i].horelFee+list[i].otherFee;
		}
		$scope.evectionDetailData.money = j+$scope.evectionDetailData.subsidy;
	}
	
});